package com.meituan.controller;

import com.meituan.pojo.resp.BaseResp;
import com.meituan.service.FuYeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/fuye")
@Api(description = "副页(主页头部点击进入页面)")
public class FuYeController {

    @Autowired
    FuYeService fuyeService;

    @PostMapping("/findByZid")
    @ApiOperation("执行时间:页面加载完成后默认执行;传入参数:int(整数) zid(首页头部点击对应的zid值,目前有效值:1,2);" +
            "传出参数:副页头部分类集合(List<FuYe>);值详解:fid:副页对象id;fname:副页对象文字;" +
            "furl:副页图片路径;zid:与主页对应部分关联id;state:状态码")
    public BaseResp findByZid(Integer zid){
        return fuyeService.findByZid(zid);
    }
}
